<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tlds/fmt.tld" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tlds/tiles-jsp.tld" prefix="tiles"%>

<div style="margin:auto;width: 960px;">
	<img src="${pageContext.request.contextPath}/resources/images/top_logo.jpg"></img>
	<button  style="z-index: 99;position: absolute;right:30px; top:15px; color:#827F7F" 
			id="logOut" onclick="document.location.href='${pageContext.request.contextPath}/logout'">Salir</button>
	<span style="z-index: 99;position: absolute;width: 300px; right:30px;top:65px; font-family: sans-serif;font-size:11px;color:#827F7F">
		Usuario:&nbsp;${userLogued.nombre}&nbsp;${userLogued.apellido}&nbsp;&nbsp;&nbsp;(${userLoguedperfil})
	</span>
</div>
<div id="menu">
	<ul id="nav">
		<c:forEach var="opcion" items="${opciones}">
			<c:choose>
				<c:when test="${opcion.nivel==1}">
					<li id="first"><a class="menu-height">${opcion.descripcion}</a>
					<ul>
						<div class="menu-barra">
						<c:forEach var="opcionNivel2" items="${opciones}">
							<c:choose>
								<c:when test="${opcionNivel2.nivel==2 and opcionNivel2.padreId==opcion.id}">
									<li><a href="${pageContext.request.contextPath}/${opcionNivel2.url}">${opcionNivel2.descripcion}</a></li>
								</c:when>
							</c:choose>
						</c:forEach>
						</div>
					</ul>
					</li>
				</c:when>
			</c:choose>
		</c:forEach>
	</ul>
</div>
